package java8Test.function;

import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ApplyMain {

	public static void main(String[] args) {
		Function<Integer, Integer> test = i -> i + 1;
		System.out.println(test.apply(6));
		
		myApplyTest.applyTest2(11);
		
		identity();
	}

	private static Runnable applyM = System.out::println;

	private static MyApplyTest myApplyTest = tt -> {
		System.out.println(tt);
	};
	
	
	private static void identity() {
        Stream<String> stream = Stream.of("I", "love", "you", "too");
        Map<String, Integer> map = stream.collect(Collectors.toMap(Function.identity(), String::length));
        System.out.println(map);
    }

}
